export default class {
  //#region 微心愿管理
  getMicroWishList(params) {
    return this.request({
      url: "/admin/v1/wish/list?status=1",
      method: "GET",
      params,
    });
  }

  getMicroWishDetail(id) {
    return this.request({
      url: `/admin/v1/wish?id=${id}`,
      method: "GET",
    });
  }

  checkMicroWishStatus(id, status) {
    return this.request({
      url: `/admin/v1/wish/check?id=${id}&status=${status}`,
      method: "GET",
    });
  }

  addMicroWish(data) {
    return this.request({
      url: `/api/admin/micro_wish/`,
      method: "POST",
      data,
    });
  }

  editMicroWish(id, data) {
    return this.request({
      url: `/api/admin/micro_wish/${id}/`,
      method: "PUT",
      data,
    });
  }

  delMicroWish(id) {
    return this.request({
      url: `/api/admin/micro_wish/${id}/`,
      method: "DELETE",
    });
  }

  //#endregion

  //#region 邻里资讯/公约管理
  getNeighborNewsList(id, params) {
    return this.request({
      url: `/admin/v1/news/list?news_type_id=${id}`,
      method: "GET",
      params,
    });
  }

  getNeighborNewsDetail(id) {
    return this.request({
      url: `/admin/v1/news?id=${id}`,
      method: "GET",
    });
  }

  addNeighborNews(data) {
    return this.request({
      url: `/admin/v1/news`,
      method: "PUT",
      data,
    });
  }

  editNeighborNews(data) {
    return this.request({
      url: `/admin/v1/news`,
      method: "POST",
      data,
    });
  }

  delNeighborNews(id) {
    return this.request({
      url: `/admin/v1/news?id=${id}`,
      method: "DELETE",
    });
  }

  getNeighborNewsUserList(id) {
    return this.request({
      url: `/admin/v1/news/rule_user?id=${id}`,
      method: "GET",
    });
  }
  //#endregion

  //#region 小区话题管理
  getVillageTopicList(params) {
    return this.request({
      url: "/admin/v1/invitation/type/list",
      method: "GET",
      params,
    });
  }
  addVillageTopic(data) {
    return this.request({
      url: `/admin/v1/invitation/type`,
      method: "PUT",
      data,
    });
  }
  editVillageTopic(id, data) {
    return this.request({
      url: `/admin/v1/invitation/type?id=${id}`,
      method: "POST",
      data,
    });
  }
  delVillageTopic(id) {
    return this.request({
      url: `/admin/v1/invitation/type?id=${id}`,
      method: "DELETE",
    });
  }
  //#endregion
  //#region 话题帖子
  getTopicPostList(id, params) {
    return this.request({
      url: `/admin/v1/invitation/list?invitation_type_id=${id}`,
      method: "GET",
      params,
    });
  }
  delTopicPost(id) {
    return this.request({
      url: `/admin/v1/invitation?id=${id}`,
      method: "DELETE",
    });
  }
  // 评论
  getVillageDiscussList(params) {
    return this.request({
      url: "/api/admin/topic_comment/",
      method: "GET",
      params,
    });
  }
  delVillageDiscuss(id) {
    return this.request({
      url: `/api/admin/topic_comment/${id}/`,
      method: "DELETE",
    });
  }
  //#endregion
}
